package com.mingnew.ecache.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mingnew.ecache.entity.Employee;
import com.mingnew.ecache.entity.dto.EmployeeDto;
import com.mingnew.ecache.entity.vo.EmployeeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author : lk
 * @date 2021/5/2 11:56
 **/
@Repository
@Mapper
public interface EmployeeMapper extends BaseMapper<Employee> {
    /**
     * 查询员工信息以及所在部门
     * @param page  分页
     *
     * @return
     */
    List<EmployeeVo> selectEmployeeList(Page page,EmployeeDto employeeDto);

    /**
     * 根据id 修改员工姓名
     *
     * @param employeeVo
     */
    void updateEmployeeById(@Param("employeeVo") EmployeeVo employeeVo);

    EmployeeVo getEmp(@Param("id") Integer id);
}
